/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package at.fhj.ase.shoppingcart.util;

import at.fhj.ase.shoppingcart.*;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.Switch;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see at.fhj.ase.shoppingcart.ShoppingcartPackage
 * @generated
 */
public class ShoppingcartSwitch<T> extends Switch<T> {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static ShoppingcartPackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ShoppingcartSwitch() {
		if (modelPackage == null) {
			modelPackage = ShoppingcartPackage.eINSTANCE;
		}
	}

	/**
	 * Checks whether this is a switch for the given package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @parameter ePackage the package in question.
	 * @return whether this is a switch for the given package.
	 * @generated
	 */
	@Override
	protected boolean isSwitchFor(EPackage ePackage) {
		return ePackage == modelPackage;
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	@Override
	protected T doSwitch(int classifierID, EObject theEObject) {
		switch (classifierID) {
			case ShoppingcartPackage.MNAMED_ELEMENT: {
				MNamedElement mNamedElement = (MNamedElement)theEObject;
				T result = caseMNamedElement(mNamedElement);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ShoppingcartPackage.MTYPE: {
				MType mType = (MType)theEObject;
				T result = caseMType(mType);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ShoppingcartPackage.MPROPERTY: {
				MProperty mProperty = (MProperty)theEObject;
				T result = caseMProperty(mProperty);
				if (result == null) result = caseMNamedElement(mProperty);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ShoppingcartPackage.MSTRING: {
				MString mString = (MString)theEObject;
				T result = caseMString(mString);
				if (result == null) result = caseMType(mString);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ShoppingcartPackage.MDOUBLE: {
				MDouble mDouble = (MDouble)theEObject;
				T result = caseMDouble(mDouble);
				if (result == null) result = caseMType(mDouble);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ShoppingcartPackage.MINTEGER: {
				MInteger mInteger = (MInteger)theEObject;
				T result = caseMInteger(mInteger);
				if (result == null) result = caseMType(mInteger);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ShoppingcartPackage.MLONG: {
				MLong mLong = (MLong)theEObject;
				T result = caseMLong(mLong);
				if (result == null) result = caseMType(mLong);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ShoppingcartPackage.MDATE: {
				MDate mDate = (MDate)theEObject;
				T result = caseMDate(mDate);
				if (result == null) result = caseMType(mDate);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ShoppingcartPackage.MCUSTOMER: {
				MCustomer mCustomer = (MCustomer)theEObject;
				T result = caseMCustomer(mCustomer);
				if (result == null) result = caseMNamedElement(mCustomer);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ShoppingcartPackage.MARTICLE: {
				MArticle mArticle = (MArticle)theEObject;
				T result = caseMArticle(mArticle);
				if (result == null) result = caseMNamedElement(mArticle);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ShoppingcartPackage.MSHOPPING_CART: {
				MShoppingCart mShoppingCart = (MShoppingCart)theEObject;
				T result = caseMShoppingCart(mShoppingCart);
				if (result == null) result = caseMNamedElement(mShoppingCart);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ShoppingcartPackage.MORDER: {
				MOrder mOrder = (MOrder)theEObject;
				T result = caseMOrder(mOrder);
				if (result == null) result = caseMNamedElement(mOrder);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ShoppingcartPackage.MADDRESS: {
				MAddress mAddress = (MAddress)theEObject;
				T result = caseMAddress(mAddress);
				if (result == null) result = caseMNamedElement(mAddress);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			default: return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MNamed Element</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MNamed Element</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMNamedElement(MNamedElement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MType</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MType</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMType(MType object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MProperty</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MProperty</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMProperty(MProperty object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MString</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MString</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMString(MString object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MDouble</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MDouble</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMDouble(MDouble object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MInteger</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MInteger</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMInteger(MInteger object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MLong</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MLong</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMLong(MLong object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MDate</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MDate</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMDate(MDate object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MCustomer</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MCustomer</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMCustomer(MCustomer object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MArticle</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MArticle</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMArticle(MArticle object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MShopping Cart</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MShopping Cart</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMShoppingCart(MShoppingCart object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MOrder</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MOrder</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMOrder(MOrder object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>MAddress</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>MAddress</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMAddress(MAddress object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch, but this is the last case anyway.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
	 * @generated
	 */
	@Override
	public T defaultCase(EObject object) {
		return null;
	}

} //ShoppingcartSwitch
